package com.benio.ycfdisplayer.fresco;

import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.view.View;

import com.facebook.common.references.CloseableReference;
import com.facebook.imagepipeline.image.CloseableImage;

/**
 * Created by zhangzhibin on 2017/3/27.
 */
public class NonViewCloseableTarget implements CloseableBitmapTarget {
    private CloseableReference<CloseableImage> mCloseableReference;

    public void setCloseableReference(CloseableReference<CloseableImage> closeableReference) {
        mCloseableReference = closeableReference.cloneOrNull();
    }

    public void close() {
        CloseableReference.closeSafely(mCloseableReference);
        mCloseableReference = null;
    }

    @Override
    public View getView() {
        return null;
    }

    @Override
    public boolean setDrawable(Drawable drawable) {
        return false;
    }

    @Override
    public boolean setBitmap(Bitmap bitmap) {
        return false;
    }
}